#!/bin/bash

set -e

concourse_dir=$(realpath $(dirname $(dirname $0)))
cd "$concourse_dir"

echo "Testing ATC"
./src/github.com/concourse/atc/scripts/test
echo "Testing Baggageclaim"
./src/github.com/concourse/baggageclaim/scripts/test
echo "Testing Blackbox"
./src/github.com/concourse/blackbox/scripts/test
echo "Testing Fly"
./src/github.com/concourse/fly/scripts/test
echo "Testing TSA"
./src/github.com/concourse/tsa/scripts/test

echo ""
echo "# Unit tests in all submodules passed!"
echo "# if you wish to run testflight run the following command:"
echo "   ${concourse_dir}/src/github.com/concourse/testflight/scripts/test"
